﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using BluePortal.Framework;
using BluePortal.Medias.Core;

namespace BluePortal.Medias.Services.Soap
{
    [ServiceContract(Namespace = "BluePortal.Medias.Services.Soap")]
    public interface IPlaylistService
    {
    }

    public class PlaylistService : IPlaylistService
    {
        private BCPlaylist service = new BCPlaylist();

        #region IVideoPlaylistService Members

        public Playlist FindByNames(string playlistName, string loginName)
        {
            return service.FindByNames(playlistName, loginName);
        }

        public FindResult<Playlist> FindAll(FindParameters findParameters)
        {
            return service.FindAll(findParameters);
        }

        public FindResult<Playlist> FindByUser(string loginName, FindParameters findParameters)
        {
            return service.FindByUser(loginName, findParameters);
        }

        public FindResult<Playlist> FindByUserWithMedia(string loginName, FindParameters findParameters)
        {
            return service.FindByUserWithMedia(loginName, findParameters);
        }
 
        public void Add(Playlist playlist, Guid vid)
        {
            service.Add(playlist, vid);
        }

        public void Remove(Guid plid, Guid vid)
        {
            service.Remove(plid, vid);
        }

        #endregion

        #region IBasicService<Playlist> Members

        public void Create(Playlist item)
        {
            service.Create(item);
        }

        public void Delete(Playlist item)
        {
            service.Delete(item);
        }

        public void Update(Playlist item)
        {
            service.Update(item);
        }

        public Playlist FindByID(Guid id)
        {
            return service.FindByID(id);
        }

        #endregion
    }
}
